<template>
  <div>

    <el-button type="primary" @click="dialogVisible = true">登陆</el-button>
    <el-dialog title="提示" :visible.sync="dialogVisible" width="25%">
      <template #default>
        <el-form label-width="80px">
        <el-form-item label="用户名">
          <el-input placeholder="请输入用户名" v-model="userForm.username" prefix-icon="el-icon-user-solid"></el-input>
        </el-form-item>
        <el-form-item label="密码">
          <el-input placeholder="请输入密码" v-model="userForm.password" :show-password="true" prefix-icon="el-icon-lock"></el-input>
        </el-form-item>
      </el-form>
      </template>

      <template #footer>
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </template>
    </el-dialog>

  </div>
</template>

<script>
export default {
  data () {
    return {
      userForm: {
        username: '',
        password: ''
      },
      dialogVisible: false
    }
  },
  methods: {
    handleClose (done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
        })
        .catch(_ => {})
    }
  }
}
</script>

<style>
  .el-input__inner{
    width: 300px !important;
  }
</style>
